-- death_reward
-- created by wangy
-- 死亡时，冈布奥增加属性

return {
    apply = function(prop, baseValue)
        return prop[3];
    end,

    -- 击杀触发
    trigger = function(who, prop, arg)
        -- 不是怪物
        if who.type ~= OBJECT_TYPE_MONSTER and who.type ~= OBJECT_TYPE_SUMMON then
            return false;
        end

        local attrib = tostring(prop[2]);
        local value  = prop[3];
        local bonus = { 2, attrib, value, };
        BonusM.doBonus(bonus, "death_reward");

        return true;
    end,

    record = function(target, prop, path)
        return false;
    end
};